import request from '@/utils/request'

export const getDepartment = () => request.get('/company/department')

export const getDepartmentManger = () => request.get('/sys/user/simple')

export const addDepartment = (data) => request.post('/company/department', data)

// 获取部门详情
// export function getDepartmentDetail(id) {
//   return request({
//     url: `/company/department/${id}`
//   })
// }
export const getDepartmentDetail = (id) => request.get(`/company/department/${id}`)

export const updateDepartment = (data) => request.put('/company/department/' + data.id, data)
// 删除
export const delDepartment = (id) => request.delete('/company/department/' + id)
